import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";

const redirect: any = "";
const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    redirect: "/demo" + redirect,
  },
  {
    path: "/demo",
    name: "Demo",
    component: () => import(/* webpackChunkName: "Demo" */ "../views/demo/index.vue"),
    meta: { title: "demo" },
  },
  {
    path: "/imageEditor",
    name: "imageEditor",
    component: () => import(/* webpackChunkName: "imageEditor" */ "../views/image/editor.vue"),
    meta: { title: "图片编辑" },
  },
  {
    path: "/videoClips",
    name: "videoClips",
    component: () => import(/* webpackChunkName: "videoClips" */ "../views/video/clips.vue"),
    meta: { title: "视频编辑" },
  },
  {
    path: "/table",
    name: "table",
    component: () => import(/* webpackChunkName: "table" */ "../views/table/index.vue"),
    meta: { title: "视频编辑" },
  },
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
